home *** CD-ROM | disk | FTP | other *** search
/ develop, the CD; issue 1 / Apple_Develop_1989.bin / Offscreen / FracApp 2.0B3 / MFracApp.p < prev    next >
Text File  |  1989-06-19  |  2KB  |  62 lines

  1. {AutoFracApp Color:
  2.     copyright 1988 by Bob.  All rights reserved.
  3.     February 1, 1988. 
  4.     Written by Bo3b Johnson of Developer Technical Support. }
  5.  
  6. PROGRAM FracApp;
  7.  
  8.     { Strange but true, you cannot compile this file with the 881 flag turned on,
  9.         or you will not be able to test for an 881 in the environment before you
  10.         crash, making it unacceptable for older machines.  }
  11.   {$MC68020-}                                    { The main program must be universal code }
  12.   {$MC68881-}
  13.  
  14. USES
  15.     {$LOAD MacIntf.LOAD}
  16.         MemTypes, QuickDraw, OSIntf, ToolIntf, PackIntf,
  17.     {$LOAD UMacApp.LOAD}
  18.         UMacAppUtilities, UViewCoords, UFailure, UMemory, UMenuSetup, UObject,
  19.         UList, UAssociation, UMacApp,
  20.     {$LOAD UBobLips.LOAD}
  21.         PaletteMgr, UPrinting,
  22.     {$LOAD}
  23.  
  24.     UFracApp;
  25.  
  26.  
  27. VAR
  28.         {The application object:}
  29.     gFracAppApplication:   TFracAppApplication;
  30.     
  31.     
  32. {$S Main}
  33.  
  34. BEGIN
  35.     InitToolbox;            { So we can put up an alert if needed. }
  36.         
  37.         { This ValidateConfiguration routine is automatic.  It takes the compile time
  38.             options specified and turns them into a list of tests to make against the
  39.             current sysenvirons record.  If any test compiled in fails, we can't run. In
  40.             this case, we only care about the FPU. }
  41.     IF ValidateConfiguration(gConfiguration) THEN
  42.         BEGIN
  43.         { Continue with remainder of initialization }
  44.         InitUMacApp(10);                                { Initialize MacApp; 10 calls to MoreMasters }
  45.                                                         
  46.         InitUPrinting;                                    { Initialize the printing unit}
  47.  
  48.         {Allocate a new TFracAppApplication object:}
  49.         NEW(gFracAppApplication);
  50.         FailNil(gFracAppApplication);
  51.     
  52.         {Initialize that new object:}
  53.         gFracAppApplication.IFracAppApplication(kFileType);
  54.  
  55.         {Run the application.  When it's done, exit.}
  56.         gFracAppApplication.Run;
  57.  
  58.         END
  59.     ELSE
  60.         StdAlert(phUnsupportedConfiguration);            { Inform user we can't run. }
  61. END.
  62.